BeSly Software Solutions About yab Demos About us Admin






Name:

chr$() -- accepts a number and returns the character at this position within the ascii charset

Synopsis:
character$=chr$(ascii)

Description:
The chr$-function is the opposite of the asc-function. It looks up and returns the character at the given position within the ascii-charset. It's typical use is to construct nonprintable characters which do not occur on your keyboard.
Nevertheless you won't use chr$ as often as you might think, because the most important nonprintable characters can be constructed using escape-sequences using the \-character (e.g. you might use \n instead of chr$(10) wherever you want to use the newline-character).

Example:
print "a",chr$(10),"b" 
Explanation:

This will print the letters 'a' and 'b' in different lines because of the intervening newline-character, which is returned by chr$(10).



Related: asc